home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / xpcom / plevent.h < prev    next >
Encoding:
C/C++ Source or Header  |  2006-05-08  |  19.5 KB  |  665 lines

  1. /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  2. /* ***** BEGIN LICENSE BLOCK *****
  3.  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
  4.  *
  5.  * The contents of this file are subject to the Mozilla Public License Version
  6.  * 1.1 (the "License"); you may not use this file except in compliance with
  7.  * the License. You may obtain a copy of the License at
  8.  * http://www.mozilla.org/MPL/
  9.  *
  10.  * Software distributed under the License is distributed on an "AS IS" basis,
  11.  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  12.  * for the specific language governing rights and limitations under the
  13.  * License.
  14.  *
  15.  * The Original Code is mozilla.org Code.
  16.  *
  17.  * The Initial Developer of the Original Code is
  18.  * Netscape Communications Corporation.
  19.  * Portions created by the Initial Developer are Copyright (C) 1998
  20.  * the Initial Developer. All Rights Reserved.
  21.  *
  22.  * Contributor(s):
  23.  *
  24.  * Alternatively, the contents of this file may be used under the terms of
  25.  * either of the GNU General Public License Version 2 or later (the "GPL"),
  26.  * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
  27.  * in which case the provisions of the GPL or the LGPL are applicable instead
  28.  * of those above. If you wish to allow use of your version of this file only
  29.  * under the terms of either the GPL or the LGPL, and not to allow others to
  30.  * use your version of this file under the terms of the MPL, indicate your
  31.  * decision by deleting the provisions above and replace them with the notice
  32.  * and other provisions required by the GPL or the LGPL. If you do not delete
  33.  * the provisions above, a recipient may use your version of this file under
  34.  * the terms of any one of the MPL, the GPL or the LGPL.
  35.  *
  36.  * ***** END LICENSE BLOCK ***** */
  37.  
  38. /**********************************************************************
  39. NSPL Events
  40.  
  41. Defining Events
  42. ---------------
  43.  
  44. Events are essentially structures that represent argument lists for a
  45. function that will run on another thread. All event structures you
  46. define must include a PLEvent struct as their first field:
  47.  
  48.     typedef struct MyEventType {
  49.         PLEvent    e;
  50.         // arguments follow...
  51.         int    x;
  52.         char*    y;
  53.     } MyEventType;
  54.  
  55. It is also essential that you establish a model of ownership for each
  56. argument passed in an event record, i.e. whether particular arguments
  57. will be deleted by the event destruction callback, or whether they
  58. only loaned to the event handler callback, and guaranteed to persist
  59. until the time at which the handler is called.
  60.  
  61. Sending Events
  62. --------------
  63.  
  64. Events are initialized by PL_InitEvent and can be sent via
  65. PL_PostEvent or PL_PostSynchronousEvent. Events can also have an
  66. owner. The owner of an event can revoke all the events in a given
  67. event-queue by calling PL_RevokeEvents. An owner might want
  68. to do this if, for instance, it is being destroyed, and handling the
  69. events after the owner's destruction would cause an error (e.g. an
  70. MWContext).
  71.  
  72. Since the act of initializing and posting an event must be coordinated
  73. with it's possible revocation, it is essential that the event-queue's
  74. monitor be entered surrounding the code that constructs, initializes
  75. and posts the event:
  76.  
  77.     void postMyEvent(MyOwner* owner, int x, char* y)
  78.     {
  79.         MyEventType* event;
  80.  
  81.         PL_ENTER_EVENT_QUEUE_MONITOR(myQueue);
  82.  
  83.         // construct
  84.         event = PR_NEW(MyEventType);
  85.         if (event == NULL) goto done;
  86.  
  87.         // initialize
  88.         PL_InitEvent(event, owner,
  89.                      (PLHandleEventProc)handleMyEvent,
  90.                      (PLDestroyEventProc)destroyMyEvent);
  91.         event->x = x;
  92.         event->y = strdup(y);
  93.  
  94.         // post
  95.         PL_PostEvent(myQueue, &event->e);
  96.  
  97.       done:
  98.         PL_EXIT_EVENT_QUEUE_MONITOR(myQueue);
  99.     }
  100.  
  101. If you don't call PL_InitEvent and PL_PostEvent within the
  102. event-queue's monitor, you'll get a big red assert. 
  103.  
  104. Handling Events
  105. ---------------
  106.  
  107. To handle an event you must write a callback that is passed the event
  108. record you defined containing the event's arguments:
  109.  
  110.     void* handleMyEvent(MyEventType* event)
  111.     {
  112.         doit(event->x, event->y);
  113.         return NULL;    // you could return a value for a sync event
  114.     }
  115.  
  116. Similarly for the destruction callback:
  117.  
  118.     void destroyMyEvent(MyEventType* event)
  119.     {
  120.         free(event->y);    // created by strdup
  121.         free(event);
  122.     }
  123.  
  124. Processing Events in Your Event Loop
  125. ------------------------------------
  126.  
  127. If your main loop only processes events delivered to the event queue,
  128. things are rather simple. You just get the next event (which may
  129. block), and then handle it:
  130.  
  131.     while (1) {
  132.         event = PL_GetEvent(myQueue);
  133.         PL_HandleEvent(event);
  134.     }
  135.  
  136. However, if other things must be waited on, you'll need to obtain a
  137. file-descriptor that represents your event queue, and hand it to select:
  138.  
  139.     fd = PL_GetEventQueueSelectFD(myQueue);
  140.     ...add fd to select set...
  141.     while (select(...)) {
  142.         if (...fd...) {
  143.             PL_ProcessPendingEvents(myQueue);
  144.         }
  145.         ...
  146.     }
  147.  
  148. Of course, with Motif and Windows it's more complicated than that, and
  149. on Mac it's completely different, but you get the picture.
  150.  
  151. Revoking Events
  152. ---------------
  153. If at any time an owner of events is about to be destroyed, you must
  154. take steps to ensure that no one tries to use the event queue after
  155. the owner is gone (or a crash may result). You can do this by either
  156. processing all the events in the queue before destroying the owner:
  157.  
  158.     {
  159.         ...
  160.         PL_ENTER_EVENT_QUEUE_MONITOR(myQueue);
  161.         PL_ProcessPendingEvents(myQueue);
  162.         DestroyMyOwner(owner);
  163.         PL_EXIT_EVENT_QUEUE_MONITOR(myQueue);
  164.         ...
  165.     }
  166.  
  167. or by revoking the events that are in the queue for that owner. This
  168. removes them from the queue and calls their destruction callback:
  169.  
  170.     {
  171.         ...
  172.         PL_ENTER_EVENT_QUEUE_MONITOR(myQueue);
  173.         PL_RevokeEvents(myQueue, owner);
  174.         DestroyMyOwner(owner);
  175.         PL_EXIT_EVENT_QUEUE_MONITOR(myQueue);
  176.         ...
  177.     }
  178.  
  179. In either case it is essential that you be in the event-queue's monitor
  180. to ensure that all events are removed from the queue for that owner, 
  181. and to ensure that no more events will be delivered for that owner.
  182. **********************************************************************/
  183.  
  184. #ifndef plevent_h___
  185. #define plevent_h___
  186.  
  187. #include "prtypes.h"
  188. #include "prclist.h"
  189. #include "prthread.h"
  190. #include "prlock.h"
  191. #include "prcvar.h"
  192. #include "prmon.h"
  193.  
  194. #include "nscore.h"
  195.  
  196. /* For HWND */
  197. #if defined(XP_WIN32)
  198. #include <windef.h>
  199. #elif defined(XP_OS2)
  200. #define INCL_DOSMISC
  201. #define INCL_DOSPROCESS
  202. #define INCL_DOSERRORS
  203. #define INCL_WINSHELLDATA
  204. #include <os2.h>
  205. #endif
  206.  
  207. PR_BEGIN_EXTERN_C
  208.  
  209. /* Typedefs */
  210.  
  211. typedef struct PLEvent PLEvent;
  212. typedef struct PLEventQueue PLEventQueue;
  213.  
  214. /*******************************************************************************
  215.  * Event Queue Operations
  216.  ******************************************************************************/
  217.  
  218. /*
  219. ** Creates a new event queue. Returns NULL on failure.
  220. */
  221. NS_COM PLEventQueue*
  222. PL_CreateEventQueue(const char* name, PRThread* handlerThread);
  223.  
  224.  
  225. /* -----------------------------------------------------------------------
  226. ** FUNCTION: PL_CreateNativeEventQueue()
  227. ** 
  228. ** DESCRIPTION:
  229. ** PL_CreateNativeEventQueue() creates an event queue that
  230. ** uses platform specific notify mechanisms.
  231. ** 
  232. ** For Unix, the platform specific notify mechanism provides
  233. ** an FD that may be extracted using the function
  234. ** PL_GetEventQueueSelectFD(). The FD returned may be used in
  235. ** a select() function call.
  236. ** 
  237. ** For Windows, the platform specific notify mechanism
  238. ** provides an event receiver window that is called by
  239. ** Windows to process the event using the windows message
  240. ** pump engine.
  241. ** 
  242. ** INPUTS: 
  243. **  name:   A name, as a diagnostic aid.
  244. ** 
  245. **  handlerThread: A pointer to the PRThread structure for
  246. ** the thread that will "handle" events posted to this event
  247. ** queue.
  248. **
  249. ** RETURNS: 
  250. ** A pointer to a PLEventQueue structure or NULL.
  251. ** 
  252. */
  253. NS_COM PLEventQueue * 
  254.     PL_CreateNativeEventQueue(
  255.         const char *name, 
  256.         PRThread *handlerThread
  257.     );
  258.  
  259. /* -----------------------------------------------------------------------
  260. ** FUNCTION: PL_CreateMonitoredEventQueue()
  261. ** 
  262. ** DESCRIPTION:
  263. ** PL_CreateMonitoredEventQueue() creates an event queue. No
  264. ** platform specific notify mechanism is created with the
  265. ** event queue.
  266. ** 
  267. ** Users of this type of event queue must explicitly poll the
  268. ** event queue to retreive and process events.
  269. ** 
  270. ** 
  271. ** INPUTS: 
  272. **  name:   A name, as a diagnostic aid.
  273. ** 
  274. **  handlerThread: A pointer to the PRThread structure for
  275. ** the thread that will "handle" events posted to this event
  276. ** queue.
  277. **
  278. ** RETURNS: 
  279. ** A pointer to a PLEventQueue structure or NULL.
  280. ** 
  281. */
  282. NS_COM PLEventQueue * 
  283.     PL_CreateMonitoredEventQueue(
  284.         const char *name,
  285.         PRThread *handlerThread
  286.     );
  287.  
  288. /*
  289. ** Destroys an event queue.
  290. */
  291. NS_COM void
  292. PL_DestroyEventQueue(PLEventQueue* self);
  293.  
  294. /* 
  295. ** Returns the monitor associated with an event queue. This monitor is 
  296. ** selectable. The monitor should be entered to protect against anyone 
  297. ** calling PL_RevokeEvents while the event is trying to be constructed
  298. ** and delivered.
  299. */
  300. NS_COM PRMonitor*
  301. PL_GetEventQueueMonitor(PLEventQueue* self);
  302.  
  303. #define PL_ENTER_EVENT_QUEUE_MONITOR(queue)    \
  304.     PR_EnterMonitor(PL_GetEventQueueMonitor(queue))
  305.  
  306. #define PL_EXIT_EVENT_QUEUE_MONITOR(queue)    \
  307.     PR_ExitMonitor(PL_GetEventQueueMonitor(queue))
  308.  
  309. /*
  310. ** Posts an event to an event queue, waking up any threads waiting for an
  311. ** event. If event is NULL, notification still occurs, but no event will
  312. ** be available. 
  313. **
  314. ** Any events delivered by this routine will be destroyed by PL_HandleEvent
  315. ** when it is called (by the event-handling thread).
  316. */
  317. NS_COM PRStatus
  318. PL_PostEvent(PLEventQueue* self, PLEvent* event);
  319.  
  320. /*
  321. ** Like PL_PostEvent, this routine posts an event to the event handling
  322. ** thread, but does so synchronously, waiting for the result. The result
  323. ** which is the value of the handler routine is returned.
  324. **
  325. ** Any events delivered by this routine will be not be destroyed by 
  326. ** PL_HandleEvent, but instead will be destroyed just before the result is
  327. ** returned (by the current thread).
  328. */
  329. NS_COM void*
  330. PL_PostSynchronousEvent(PLEventQueue* self, PLEvent* event);
  331.  
  332. /*
  333. ** Gets an event from an event queue. Returns NULL if no event is
  334. ** available.
  335. */
  336. NS_COM PLEvent*
  337. PL_GetEvent(PLEventQueue* self);
  338.  
  339. /*
  340. ** Returns true if there is an event available for PL_GetEvent.
  341. */
  342. NS_COM PRBool
  343. PL_EventAvailable(PLEventQueue* self);
  344.  
  345. /*
  346. ** This is the type of the function that must be passed to PL_MapEvents
  347. ** (see description below).
  348. */
  349. typedef void 
  350. (PR_CALLBACK *PLEventFunProc)(PLEvent* event, void* data, PLEventQueue* queue);
  351.  
  352. /*
  353. ** Applies a function to every event in the event queue. This can be used
  354. ** to selectively handle, filter, or remove events. The data pointer is
  355. ** passed to each invocation of the function fun.
  356. */
  357. NS_COM void
  358. PL_MapEvents(PLEventQueue* self, PLEventFunProc fun, void* data);
  359.  
  360. /*
  361. ** This routine walks an event queue and destroys any event whose owner is
  362. ** the owner specified. The == operation is used to compare owners.
  363. */
  364. NS_COM void
  365. PL_RevokeEvents(PLEventQueue* self, void* owner);
  366.  
  367. /*
  368. ** This routine processes all pending events in the event queue. It can be
  369. ** called from the thread's main event-processing loop whenever the event
  370. ** queue's selectFD is ready (returned by PL_GetEventQueueSelectFD).
  371. */
  372. NS_COM void
  373. PL_ProcessPendingEvents(PLEventQueue* self);
  374.  
  375. /*******************************************************************************
  376.  * Pure Event Queues
  377.  *
  378.  * For when you're only processing PLEvents and there is no native
  379.  * select, thread messages, or AppleEvents.
  380.  ******************************************************************************/
  381.  
  382. /*
  383. ** Blocks until an event can be returned from the event queue. This routine
  384. ** may return NULL if the current thread is interrupted.
  385. */
  386. NS_COM PLEvent*
  387. PL_WaitForEvent(PLEventQueue* self);
  388.  
  389. /*
  390. ** One stop shopping if all you're going to do is process PLEvents. Just
  391. ** call this and it loops forever processing events as they arrive. It will
  392. ** terminate when your thread is interrupted or dies.
  393. */
  394. NS_COM void
  395. PL_EventLoop(PLEventQueue* self);
  396.  
  397. /*******************************************************************************
  398.  * Native Event Queues
  399.  *
  400.  * For when you need to call select, or WaitNextEvent, and yet also want
  401.  * to handle PLEvents.
  402.  ******************************************************************************/
  403.  
  404. /*
  405. ** This routine allows you to grab the file descriptor associated with an
  406. ** event queue and use it in the readFD set of select. Useful for platforms
  407. ** that support select, and must wait on other things besides just PLEvents.
  408. */
  409. NS_COM PRInt32
  410. PL_GetEventQueueSelectFD(PLEventQueue* self);
  411.  
  412. /*
  413. **  This routine will allow you to check to see if the given eventQueue in
  414. **  on the current thread.  It will return PR_TRUE if so, else it will return
  415. **  PR_FALSE
  416. */
  417. NS_COM PRBool
  418.     PL_IsQueueOnCurrentThread( PLEventQueue *queue );
  419.  
  420. /*
  421. ** Returns whether the queue is native (true) or monitored (false)
  422. */
  423. NS_COM PRBool
  424. PL_IsQueueNative(PLEventQueue *queue);
  425.  
  426. /*******************************************************************************
  427.  * Event Operations
  428.  ******************************************************************************/
  429.  
  430. /*
  431. ** The type of an event handler function. This function is passed as an
  432. ** initialization argument to PL_InitEvent, and called by
  433. ** PL_HandleEvent. If the event is called synchronously, a void* result 
  434. ** may be returned (otherwise any result will be ignored).
  435. */
  436. typedef void*
  437. (PR_CALLBACK *PLHandleEventProc)(PLEvent* self);
  438.  
  439. /*
  440. ** The type of an event destructor function. This function is passed as
  441. ** an initialization argument to PL_InitEvent, and called by
  442. ** PL_DestroyEvent.
  443. */
  444. typedef void
  445. (PR_CALLBACK *PLDestroyEventProc)(PLEvent* self);
  446.  
  447. /*
  448. ** Initializes an event. Usually events are embedded in a larger event
  449. ** structure which holds event-specific data, so this is an initializer
  450. ** for that embedded part of the structure.
  451. */
  452. NS_COM void
  453. PL_InitEvent(PLEvent* self, void* owner,
  454.              PLHandleEventProc handler,
  455.              PLDestroyEventProc destructor);
  456.  
  457. /*
  458. ** Returns the owner of an event. 
  459. */
  460. NS_COM void*
  461. PL_GetEventOwner(PLEvent* self);
  462.  
  463. /*
  464. ** Handles an event, calling the event's handler routine.
  465. */
  466. NS_COM void
  467. PL_HandleEvent(PLEvent* self);
  468.  
  469. /*
  470. ** Destroys an event, calling the event's destructor.
  471. */
  472. NS_COM void
  473. PL_DestroyEvent(PLEvent* self);
  474.  
  475. /*
  476. ** Removes an event from an event queue.
  477. */
  478. NS_COM void
  479. PL_DequeueEvent(PLEvent* self, PLEventQueue* queue);
  480.  
  481.  
  482. /*
  483.  * Give hint to native PL_Event notification mechanism. If the native 
  484.  * platform needs to tradeoff performance vs. native event starvation
  485.  * this hint tells the native dispatch code which to favor.
  486.  * The default is to prevent event starvation. 
  487.  * 
  488.  * Calls to this function may be nested. When the number of calls that 
  489.  * pass PR_TRUE is subtracted from the number of calls that pass PR_FALSE 
  490.  * is greater than 0, performance is given precedence over preventing 
  491.  * event starvation.
  492.  *
  493.  * The starvationDelay arg is only used when 
  494.  * favorPerformanceOverEventStarvation is PR_FALSE. It is the
  495.  * amount of time in milliseconds to wait before the PR_FALSE actually 
  496.  * takes effect.
  497.  */
  498. NS_COM void
  499. PL_FavorPerformanceHint(PRBool favorPerformanceOverEventStarvation, PRUint32 starvationDelay);
  500.  
  501.  
  502. /*******************************************************************************
  503.  * Private Stuff
  504.  ******************************************************************************/
  505.  
  506. struct PLEvent {
  507.     PRCList                link;
  508.     PLHandleEventProc    handler;
  509.     PLDestroyEventProc    destructor;
  510.     void*                owner;
  511.     void*                synchronousResult;
  512.     PRLock*             lock;
  513.     PRCondVar*          condVar;
  514.     PRBool              handled;
  515. #ifdef PL_POST_TIMINGS
  516.     PRIntervalTime      postTime;
  517. #endif
  518. #ifdef XP_UNIX
  519.     unsigned long       id;
  520. #endif /* XP_UNIX */
  521.     /* other fields follow... */
  522. };
  523.  
  524. /******************************************************************************/
  525.  
  526. /*
  527. ** Returns the event queue associated with the main thread.
  528. ** 
  529. */
  530. #if defined(XP_WIN) || defined(XP_OS2)
  531. /* -----------------------------------------------------------------------
  532. ** FUNCTION: PL_GetNativeEventReceiverWindow()
  533. ** 
  534. ** DESCRIPTION:
  535. ** PL_GetNativeEventReceiverWindow() returns the windows
  536. ** handle of the event receiver window associated with the
  537. ** referenced PLEventQueue argument.
  538. ** 
  539. ** INPUTS: 
  540. **  PLEventQueue pointer
  541. **
  542. ** RETURNS:
  543. **  event receiver window handle.
  544. ** 
  545. ** RESTRICTIONS: MS-Windows ONLY.
  546. ** 
  547. */
  548. NS_COM HWND 
  549.     PL_GetNativeEventReceiverWindow( 
  550.         PLEventQueue *eqp 
  551.     );
  552. #endif /* XP_WIN || XP_OS2 */
  553.  
  554. #ifdef XP_UNIX
  555. /* -----------------------------------------------------------------------
  556. ** FUNCTION: PL_ProcessEventsBeforeID()
  557. **
  558. ** DESCRIPTION:
  559. **
  560. ** PL_ProcessEventsBeforeID() will process events in a native event
  561. ** queue that have an id that is older than the ID passed in.
  562. **
  563. ** INPUTS:
  564. **  PLEventQueue *aSelf
  565. **  unsigned long aID
  566. **
  567. ** RETURNS:
  568. **  PRInt32 number of requests processed, -1 on error.
  569. **
  570. ** RESTRICTIONS: Unix only (well, X based unix only)
  571. */
  572. NS_COM PRInt32
  573. PL_ProcessEventsBeforeID(PLEventQueue *aSelf, unsigned long aID);
  574.  
  575. /* This prototype is a function that can be called when an event is
  576.    posted to stick an ID on it.  */
  577.  
  578. typedef unsigned long
  579. (PR_CALLBACK *PLGetEventIDFunc)(void *aClosure);
  580.  
  581.  
  582. /* -----------------------------------------------------------------------
  583. ** FUNCTION: PL_RegisterEventIDFunc()
  584. **
  585. ** DESCRIPTION:
  586. **
  587. ** This function registers a function for getting the ID on unix for
  588. ** this event queue.
  589. **
  590. ** INPUTS:
  591. **  PLEventQueue *aSelf
  592. **  PLGetEventIDFunc func
  593. **  void *aClosure
  594. **
  595. ** RETURNS:
  596. **  void
  597. **
  598. ** RESTRICTIONS: Unix only (well, X based unix only) */
  599. NS_COM void
  600. PL_RegisterEventIDFunc(PLEventQueue *aSelf, PLGetEventIDFunc aFunc,
  601.                        void *aClosure);
  602.  
  603. /* -----------------------------------------------------------------------
  604. ** FUNCTION: PL_RegisterEventIDFunc()
  605. **
  606. ** DESCRIPTION:
  607. **
  608. ** This function unregisters a function for getting the ID on unix for
  609. ** this event queue.
  610. **
  611. ** INPUTS:
  612. **  PLEventQueue *aSelf
  613. **
  614. ** RETURNS:
  615. **  void
  616. **
  617. ** RESTRICTIONS: Unix only (well, X based unix only) */
  618. NS_COM void
  619. PL_UnregisterEventIDFunc(PLEventQueue *aSelf);
  620.  
  621. #endif /* XP_UNIX */
  622.  
  623.  
  624. /* ----------------------------------------------------------------------- */
  625.  
  626. #if defined(NO_NSPR_10_SUPPORT)
  627. #else
  628. /********* ???????????????? FIX ME       ??????????????????????????? *****/
  629. /********************** Some old definitions *****************************/
  630.  
  631. /* Re: prevent.h->plevent.h */
  632. #define PREvent PLEvent
  633. #define PREventQueue PLEventQueue
  634. #define PR_CreateEventQueue PL_CreateEventQueue
  635. #define PR_DestroyEventQueue PL_DestroyEventQueue
  636. #define PR_GetEventQueueMonitor PL_GetEventQueueMonitor
  637. #define PR_ENTER_EVENT_QUEUE_MONITOR PL_ENTER_EVENT_QUEUE_MONITOR
  638. #define PR_EXIT_EVENT_QUEUE_MONITOR PL_EXIT_EVENT_QUEUE_MONITOR
  639. #define PR_PostEvent PL_PostEvent
  640. #define PR_PostSynchronousEvent PL_PostSynchronousEvent
  641. #define PR_GetEvent PL_GetEvent
  642. #define PR_EventAvailable PL_EventAvailable
  643. #define PREventFunProc PLEventFunProc
  644. #define PR_MapEvents PL_MapEvents
  645. #define PR_RevokeEvents PL_RevokeEvents
  646. #define PR_ProcessPendingEvents PL_ProcessPendingEvents
  647. #define PR_WaitForEvent PL_WaitForEvent
  648. #define PR_EventLoop PL_EventLoop
  649. #define PR_GetEventQueueSelectFD PL_GetEventQueueSelectFD
  650. #define PRHandleEventProc PLHandleEventProc
  651. #define PRDestroyEventProc PLDestroyEventProc
  652. #define PR_InitEvent PL_InitEvent
  653. #define PR_GetEventOwner PL_GetEventOwner
  654. #define PR_HandleEvent PL_HandleEvent
  655. #define PR_DestroyEvent PL_DestroyEvent
  656. #define PR_DequeueEvent PL_DequeueEvent
  657. #define PR_GetMainEventQueue PL_GetMainEventQueue
  658.  
  659. /********* ????????????? End Fix me ?????????????????????????????? *****/
  660. #endif /* NO_NSPR_10_SUPPORT */
  661.  
  662. PR_END_EXTERN_C
  663.  
  664. #endif /* plevent_h___ */
  665.